package com.minisoft.controller;

import com.minisoft.pool.MpUserEventDto;
import com.minisoft.utils.RedisTest;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JueSu
 * @description: TODO
 * @date 2022/11/7 10:07
 */
@RestController
public class RedisController {

    private RedisTest redisTest;

    @PostMapping("/sendMsg")
    public void sendMsg(@RequestBody MpUserEventDto dto) {
        redisTest.cacheUserInfo(dto);
    }

    @GetMapping("/test")
    public String test() {
        return "test";
    }
}
